<template>
<ul class="clearfix restaurant_container center">
    <li class="restaurant_list clearfix" v-for="(data,index) in resdata" :key="index">
        <img src="static/img/restaurant/res1.jpg" alt="" class="res_img">
        <div class="res_info_box">
            <div class="res_info">
                <div class="res_name">{{ data.name }}</div>
                <div class="res_addr">政立路477</div>
                <div class="res_score">
                    <span class="res_star">★★★★☆</span>
                    <span class="res_star_score">4</span>
                    <span class="res_price">月售{{ data.sellNum }}</span>
                </div>
                <div class="res_consume">
                    <span>起送￥20</span>
                    <span>配送￥5</span>
                    <span>￥{{ data.price }} /人</span>
                </div>
                <div class="res_tag_warp clearfix">
                    <span class="res_class">{{ data.class }}</span>
                    <span class="res_tag" v-for="(item) in data.tags">{{ item }}</span>
                </div>
            </div>
            <div class="res_activity">
                <div class="">{{ data.activity }}</div>
            </div>
        </div>
    </li>
</ul>
</template>

<script>

export default {
    props: ['resdata'],
    data() {
        return {
        }

    },
    components: {

    }
}
</script>

<style lang="scss">
.restaurant_container {
    padding-top: 0.12rem;
    padding-bottom: 50px;

    .restaurant_list {
        width: 100%;
        padding: 5px 0;
        text-align: left;
        margin-bottom: 0.5rem;
        font-family: "微软雅黑", Arial, Tahoma !important;

        &:last-of-type {
            margin-bottom: 0;
        }

        .res_img {
            float: left;
            width: 1.80rem;
            height: auto;
            margin-right: 0.14rem;
            border-radius: 0.05rem;
            border: 1px solid #f7f7f7;
        }
        .res_info_box {
            overflow: hidden;
            width: auto;
        }

        .res_info {
            position: relative;
            display: block;
            font-size: 0.22rem;
            color: #666;
            // padding-bottom: 0.25rem;
            margin-bottom: 0.15rem;

            // border-bottom: 1px solid #ddd;
            .res_name {
                font-size: 0.30rem;
                margin-bottom: 0.16rem;
                color: #333;
                font-weight: bold;
            }

            .res_addr {
                position: absolute;
                top: 0px;
                right: 0px;
                color: #A3A3A3;
            }
            .res_score {
                margin-bottom: 0.16rem;
                

                .res_star {
                    color: #FF6E03;
                }
                .res_star_score{
                margin-right: 0.1rem;
                }
            }

            .res_consume {
                margin-bottom: 0.16rem;

                span {
                    &:after {
                        display: inline-block;
                        content: '';
                        width: 1px;
                        height: 0.15rem;
                        background: #888;
                        margin-left: 5px;
                    }

                    &:last-of-type:after {
                        display: none;
                    }
                }

            }

            .res_price {
                // float: right;
            }

            .res_activity {}

            .res_tag_warp {
                width: 100%;
                margin-bottom: 0.16rem;

                .res_class {
                    float: left;
                    margin-right: 5px;
                }

                .res_tag {
                    float: left;
                    background: #F2E0BC;
                    color: #FDA050;
                    margin-right: 3px;
                    font-size: 0.16rem;
                    padding: 1px;
                }
            }

        }

        .res_activity {
            color: #FF6E03;
            font-size: 10px; // margin-left:-10%;
            // -webkit-transform:scale(0.8);
        }
    }
}
</style>
